package com.wicket.okrapp.web.contorller;

import com.github.pagehelper.Page;
import com.wicket.okrapp.biz.service.EvaThemeService;
import com.wicket.okrapp.biz.service.dto.req.*;
import com.wicket.okrapp.biz.service.dto.res.*;
import com.wicket.okrapp.common.ro.OkrResult;
import com.wicket.okrapp.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/app/evaTheme/")
public class EvaThemeController {
    @Autowired
    EvaThemeService evaThemeService;

    /**
   * D3-2批量查询评价主题列表
   */
    @PostMapping("batchQueryEvaThemeList")
    public OkrResult<BatchQueryEvaThemeListRespDto> batchQueryEvaThemeList(@RequestBody @Validated BatchQueryEvaThemeListReqDto reqDTO){
    return OkrResult.success(evaThemeService.batchQueryEvaThemeList(reqDTO));
    }
/**
   * D3-2修改评价主题
   */
    @PostMapping("updateEvaTheme")
    public OkrResult<UpdateEvaThemeRespDto> updateEvaTheme(@RequestBody @Validated UpdateEvaThemeReqDto reqDTO){
    return OkrResult.success(evaThemeService.updateEvaTheme(reqDTO));
    }
/**
   * D3-2批量查询评价模板
   */
    @PostMapping("batchQueryEvaTemp")
    public OkrResult<BatchQueryEvaTempRespDto> batchQueryEvaTemp(@RequestBody @Validated BatchQueryEvaTempReqDto reqDTO){
    return OkrResult.success(evaThemeService.batchQueryEvaTemp(reqDTO));
    }
/**
   * D3-2查评价主题详情
   */
    @PostMapping("queryEvaThemeDetail")
    public OkrResult<QueryEvaThemeDetailRespDto> queryEvaThemeDetail(@RequestBody @Validated QueryEvaThemeDetailReqDto reqDTO){
    return OkrResult.success(evaThemeService.queryEvaThemeDetail(reqDTO));
    }
/**
   * D3-2查评价主题列表
   */
    @PostMapping("queryEvaThemeList")
    public OkrResult<QueryEvaThemeListRespDto> queryEvaThemeList(@RequestBody @Validated QueryEvaThemeListReqDto reqDTO){
    Page<?> page = CommonFunctionHelper.startPage(reqDTO.getPageNum(),reqDTO.getPageSize());

        QueryEvaThemeListRespDto retData = evaThemeService.queryEvaThemeList(reqDTO);

        retData.setPageNum(page.getPageNum());
        retData.setPageSize(page.getPageSize());
        retData.setTotalNum(page.getTotal());
        return OkrResult.success(retData);
    
    }
/**
   * D3-2新增评价主题
   */
    @PostMapping("addEvaTheme")
    public OkrResult<AddEvaThemeRespDto> addEvaTheme(@RequestBody @Validated AddEvaThemeReqDto reqDTO){
    return OkrResult.success(evaThemeService.addEvaTheme(reqDTO));
    }
/**
   * D3-2删除评价主题
   */
    @PostMapping("deleteEvaTheme")
    public OkrResult<DeleteEvaThemeRespDto> deleteEvaTheme(@RequestBody @Validated DeleteEvaThemeReqDto reqDTO){
    return OkrResult.success(evaThemeService.deleteEvaTheme(reqDTO));
    }

    /**
   * D3-2查评价模板详情
   */
    @PostMapping("queryEvaTempDetail")
    public OkrResult<QueryEvaTempDetailRespDto> queryEvaTempDetail(@RequestBody @Validated QueryEvaTempDetailReqDto reqDTO){
    return OkrResult.success(evaThemeService.queryEvaTempDetail(reqDTO));
    }
/**
   * D3-2批量增评价角色(公共)
   */
    @PostMapping("batchAddFillRoleCom")
    public OkrResult<BatchAddFillRoleComRespDto> batchAddFillRoleCom(@RequestBody @Validated BatchAddFillRoleComReqDto reqDTO){
    return OkrResult.success(evaThemeService.batchAddFillRoleCom(reqDTO));
    }
/**
   * D3-2新增评价模板
   */
    @PostMapping("addEvaTemp")
    public OkrResult<AddEvaTempRespDto> addEvaTemp(@RequestBody @Validated AddEvaTempReqDto reqDTO){
    return OkrResult.success(evaThemeService.addEvaTemp(reqDTO));
    }
/**
   * D3-2新增评价画像相关
   */
    @PostMapping("addEvaPortraitRelated")
    public OkrResult<AddEvaPortraitRelatedRespDto> addEvaPortraitRelated(@RequestBody @Validated AddEvaPortraitRelatedReqDto reqDTO){
    return OkrResult.success(evaThemeService.addEvaPortraitRelated(reqDTO));
    }
/**
   * D3-2发布批次处理评价模板更新状态(公共)
   */
    @PostMapping("releaseBatchHandleEvaTempUpdStatusCom")
    public OkrResult<ReleaseBatchHandleEvaTempUpdStatusComRespDto> releaseBatchHandleEvaTempUpdStatusCom(@RequestBody @Validated ReleaseBatchHandleEvaTempUpdStatusComReqDto reqDTO){
    return OkrResult.success(evaThemeService.releaseBatchHandleEvaTempUpdStatusCom(reqDTO));
    }
/**
   * D3-2检查是否参与评价工作
   */
    @PostMapping("checkIsOpenEva")
    public OkrResult<CheckIsOpenEvaRespDto> checkIsOpenEva(@RequestBody @Validated CheckIsOpenEvaReqDto reqDTO){
    return OkrResult.success(evaThemeService.checkIsOpenEva(reqDTO));
    }
/**
   * D3-3新增评价模板判断
   */
    @PostMapping("queryAddEvaTempJudgeDetail")
    public OkrResult<QueryAddEvaTempJudgeDetailRespDto> queryAddEvaTempJudgeDetail(@RequestBody @Validated QueryAddEvaTempJudgeDetailReqDto reqDTO){
    return OkrResult.success(evaThemeService.queryAddEvaTempJudgeDetail(reqDTO));
    }
/**
   * D3-删除评价填报人员(公共)
   */
    @PostMapping("deleteEvaFillMemberCom")
    public OkrResult<DeleteEvaFillMemberComRespDto> deleteEvaFillMemberCom(@RequestBody @Validated DeleteEvaFillMemberComReqDto reqDTO){
    return OkrResult.success(evaThemeService.deleteEvaFillMemberCom(reqDTO));
    }
/**
   * D3-删除评价填报角色(公共)
   */
    @PostMapping("deleteEvaFillRoleCom")
    public OkrResult<DeleteEvaFillRoleComRespDto> deleteEvaFillRoleCom(@RequestBody @Validated DeleteEvaFillRoleComReqDto reqDTO){
    return OkrResult.success(evaThemeService.deleteEvaFillRoleCom(reqDTO));
    }
/**
   * D3-删除评价对象(公共)
   */
    @PostMapping("deleteEvaObjectCom")
    public OkrResult<DeleteEvaObjectComRespDto> deleteEvaObjectCom(@RequestBody @Validated DeleteEvaObjectComReqDto reqDTO){
    return OkrResult.success(evaThemeService.deleteEvaObjectCom(reqDTO));
    }
/**
   * D3-3返回评价模板第一步
   */
    @PostMapping("backToFirstStepEvaTemp")
    public OkrResult<BackToFirstStepEvaTempRespDto> backToFirstStepEvaTemp(@RequestBody @Validated BackToFirstStepEvaTempReqDto reqDTO){
    return OkrResult.success(evaThemeService.backToFirstStepEvaTemp(reqDTO));
    }
/**
   * D3-2查询评价填报角色详情
   */
    @PostMapping("queryEvaFillRoleDetail")
    public OkrResult<QueryEvaFillRoleDetailRespDto> queryEvaFillRoleDetail(@RequestBody @Validated QueryEvaFillRoleDetailReqDto reqDTO){
    return OkrResult.success(evaThemeService.queryEvaFillRoleDetail(reqDTO));
    }
/**
   * D3-2查询评价填报人员详情
   */
    @PostMapping("queryEvaFillMemberDetail")
    public OkrResult<QueryEvaFillMemberDetailRespDto> queryEvaFillMemberDetail(@RequestBody @Validated QueryEvaFillMemberDetailReqDto reqDTO){
    return OkrResult.success(evaThemeService.queryEvaFillMemberDetail(reqDTO));
    }
/**
   * D3-3判断新增的评价模板(公共)
   */
    @PostMapping("judgeAddEvaTempCom")
    public OkrResult<JudgeAddEvaTempComRespDto> judgeAddEvaTempCom(@RequestBody @Validated JudgeAddEvaTempComReqDto reqDTO){
    return OkrResult.success(evaThemeService.judgeAddEvaTempCom(reqDTO));
    }
/**
   * D3-2删除评价画像(公共)
   */
    @PostMapping("deleteEvaPortraitCom")
    public OkrResult<DeleteEvaPortraitComRespDto> deleteEvaPortraitCom(@RequestBody @Validated DeleteEvaPortraitComReqDto reqDTO){
    return OkrResult.success(evaThemeService.deleteEvaPortraitCom(reqDTO));
    }
/**
   * D3-2新增评价填报角色(公共)
   */
    @PostMapping("addEvaFillRoleCom")
    public OkrResult<AddEvaFillRoleComRespDto> addEvaFillRoleCom(@RequestBody @Validated AddEvaFillRoleComReqDto reqDTO){
    return OkrResult.success(evaThemeService.addEvaFillRoleCom(reqDTO));
    }
/**
   * D3-2执行删除模板克隆答案等相关(公共)
   */
    @PostMapping("implementTempCloneResultEtcCom")
    public OkrResult<ImplementTempCloneResultEtcComRespDto> implementTempCloneResultEtcCom(@RequestBody @Validated ImplementTempCloneResultEtcComReqDto reqDTO){
    return OkrResult.success(evaThemeService.implementTempCloneResultEtcCom(reqDTO));
    }
/**
   * D3-2检查是否参与评价工作(公共)
   */
    @PostMapping("checkIsOpenEvaCom")
    public OkrResult<CheckIsOpenEvaComRespDto> checkIsOpenEvaCom(@RequestBody @Validated CheckIsOpenEvaComReqDto reqDTO){
    return OkrResult.success(evaThemeService.checkIsOpenEvaCom(reqDTO));
    }
/**
   * D3-2查询评价填报角色详情(公共)
   */
    @PostMapping("queryEvaFillRoleDetailCom")
    public OkrResult<QueryEvaFillRoleDetailComRespDto> queryEvaFillRoleDetailCom(@RequestBody @Validated QueryEvaFillRoleDetailComReqDto reqDTO){
    return OkrResult.success(evaThemeService.queryEvaFillRoleDetailCom(reqDTO));
    }
/**
   * D3执行高层人工设置完成
   */
    @PostMapping("implementMidManualSetComplet")
    public OkrResult<ImplementMidManualSetCompletRespDto> implementMidManualSetComplet(@RequestBody @Validated ImplementMidManualSetCompletReqDto reqDTO){
    return OkrResult.success(evaThemeService.implementMidManualSetComplet(reqDTO));
    }
/**
   * D3查询评价主题列表(公共)
   */
    @PostMapping("queryEvaThemeListCom")
    public OkrResult<QueryEvaThemeListComRespDto> queryEvaThemeListCom(@RequestBody @Validated QueryEvaThemeListComReqDto reqDTO){
    return OkrResult.success(evaThemeService.queryEvaThemeListCom(reqDTO));
    }
/**
   * D3查询评价模板当前特权管理状态
   */
    @PostMapping("queryEvaTempPresentIsSuperMgtStateDetail")
    public OkrResult<QueryEvaTempPresentIsSuperMgtStateDetailRespDto> queryEvaTempPresentIsSuperMgtStateDetail(@RequestBody @Validated QueryEvaTempPresentIsSuperMgtStateDetailReqDto reqDTO){
    return OkrResult.success(evaThemeService.queryEvaTempPresentIsSuperMgtStateDetail(reqDTO));
    }
/**
   * D3执行评价模板新增条件判断(公共)
   */
    @PostMapping("implementEvaTempAddTermJudgeCom")
    public OkrResult<ImplementEvaTempAddTermJudgeComRespDto> implementEvaTempAddTermJudgeCom(@RequestBody @Validated ImplementEvaTempAddTermJudgeComReqDto reqDTO){
    return OkrResult.success(evaThemeService.implementEvaTempAddTermJudgeCom(reqDTO));
    }
/**
   * D3新增评价模板开通记录
   */
    @PostMapping("addEvaTempOpenRecord")
    public OkrResult<AddEvaTempOpenRecordRespDto> addEvaTempOpenRecord(@RequestBody @Validated AddEvaTempOpenRecordReqDto reqDTO){
    return OkrResult.success(evaThemeService.addEvaTempOpenRecord(reqDTO));
    }
/**
   * D3发布批次处理评价填报角色更新状态(公共)
   */
    @PostMapping("releaseBatchHandleEvaFillRoleUpdStatusCom")
    public OkrResult<ReleaseBatchHandleEvaFillRoleUpdStatusComRespDto> releaseBatchHandleEvaFillRoleUpdStatusCom(@RequestBody @Validated ReleaseBatchHandleEvaFillRoleUpdStatusComReqDto reqDTO){
    return OkrResult.success(evaThemeService.releaseBatchHandleEvaFillRoleUpdStatusCom(reqDTO));
    }
/**
   * D3发布批次处理评价画像相关更新状态(公共)
   */
    @PostMapping("releaseBatchHandleEvaPortraitRelatedUpdStatusCom")
    public OkrResult<ReleaseBatchHandleEvaPortraitRelatedUpdStatusComRespDto> releaseBatchHandleEvaPortraitRelatedUpdStatusCom(@RequestBody @Validated ReleaseBatchHandleEvaPortraitRelatedUpdStatusComReqDto reqDTO){
    return OkrResult.success(evaThemeService.releaseBatchHandleEvaPortraitRelatedUpdStatusCom(reqDTO));
    }
/**
   * D3查询评价模板列表(公共)(边界)
   */
    @PostMapping("queryEvaTempListComBorder")
    public OkrResult<QueryEvaTempListComBorderRespDto> queryEvaTempListComBorder(@RequestBody @Validated QueryEvaTempListComBorderReqDto reqDTO){
    return OkrResult.success(evaThemeService.queryEvaTempListComBorder(reqDTO));
    }
/**
   * D3获取空间有效评价模板(公共)
   */
    @PostMapping("obtainSpaceValidEvaTempCom")
    public OkrResult<ObtainSpaceValidEvaTempComRespDto> obtainSpaceValidEvaTempCom(@RequestBody @Validated ObtainSpaceValidEvaTempComReqDto reqDTO){
    return OkrResult.success(evaThemeService.obtainSpaceValidEvaTempCom(reqDTO));
    }
/**
   * D3查询评价模板详情(公共)
   */
    @PostMapping("queryEvaTempDetailCom")
    public OkrResult<QueryEvaTempDetailComRespDto> queryEvaTempDetailCom(@RequestBody @Validated QueryEvaTempDetailComReqDto reqDTO){
    return OkrResult.success(evaThemeService.queryEvaTempDetailCom(reqDTO));
    }
/**
   * D3-2批量查询评价模板(公共)
   */
    @PostMapping("batchQueryEvaTempCom")
    public OkrResult<BatchQueryEvaTempComRespDto> batchQueryEvaTempCom(@RequestBody @Validated BatchQueryEvaTempComReqDto reqDTO){
    return OkrResult.success(evaThemeService.batchQueryEvaTempCom(reqDTO));
    }
}
  